<include file="../header" />
<body class="J_scroll_fixed">
    <script>

        $(document).ready(function() {
            
            $('button.offlineopen').click(function () {
                var termNumber = $("input[name=termNumber]").val();
                //正则判断是否为数字
                if(!/^[0-9]+$/.test(termNumber)||termNumber===''||termNumber===null) {
                    layer.msg('时长应为数字且不能为空!');
                    return false;
                }else{
                    $("#offline").submit();
                }
            });
        });

    </script>
    <div class="wrap jj">
        <div class="common-form">
            <form id="offline" method="post" class="form-horizontal J_ajaxForm" action="{:U('test/buyPost')}">
                <fieldset>
                    <div class="control-group">
                        <label class="control-label">手机号：</label>
                        <div class="controls" id="price">
                            <input type="text" class="input" name="mobile" >
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">会员卡类型：</label>
                        <div class="controls">
                            {:getEnumSelectWidget($cards, 'cardType')}
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">支付方式:</label>
                        <div class="controls">
                            {:getEnumSelectWidget($paytype, 'payType')}
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">渠道:</label>
                        <div class="controls">
                            {:getEnumSelectWidget($channels, 'channel',$channel)}
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">时长：</label>
                        <div class="controls">
                            <input type="text" class="input" name="termNumber" value="1">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">开始时间：</label>
                        <div class="controls" id="price">
                            <input type="text" class="input" name="begin">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">结束时间：</label>
                        <div class="controls" id="price">
                            <input type="text" class="input" name="end">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">价格：</label>
                        <div class="controls" id="price">
                            <input type="text" class="input" name="price" value="990">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">合同号：</label>
                        <div class="controls" id="price">
                            <input type="text" class="input" name="contractNo" value="990">
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">指纹号：</label>
                        <div class="controls" id="price">
                            <input type="text" class="input" name="finger" >
                        </div>
                    </div>
                    <div class="control-group">
                        <label class="control-label">卡号：</label>
                        <div class="controls" id="price">
                            <input type="text" class="input" name="cardNumber" >
                        </div>
                    </div>
                </fieldset>
                <div class="form-actions">
                    <button  class="offlineopen btn">购买</button>                    
                </div>
            </form>
        </div>
    </div>
	<script src="__ROOT__/statics/js/common.js"></script>
</body>
</html>